package com.hyd.hx_adr.modules.examine.controller;

import com.hyd.hx_adr.domain.entity.JsonResult;
import com.hyd.hx_adr.domain.info.BaseBatchInfo;
import com.hyd.hx_adr.domain.info.BaseInfo;
import com.hyd.hx_adr.modules.examine.domain.entity.Examine;
import com.hyd.hx_adr.modules.examine.service.ExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@RestController
@RequestMapping("/examine")
public class ExamineController {

    @Autowired
    private ExamineService examineService;

    @PostMapping("/importExamine")
    public JsonResult<String> importExamine(MultipartFile file) {
        return examineService.importExamine(file);
    }

    @PostMapping("/queryExamineList")
    public JsonResult<List<Examine>> queryExamineList(@RequestBody BaseInfo info) {
        return examineService.queryExamineList(info);
    }

    @PostMapping("/deleteExamine")
    public JsonResult<String> deleteExamine(@RequestBody BaseBatchInfo info) {
        return examineService.deleteExamine(info);
    }
}
